
#include <assert.h>

static inline bool kogi_list_empty(struct kogi_list const* list)
{
    return 0 == list->size;
}

static inline size_t kogi_list_size(struct kogi_list const* list)
{
    return list->size;
}

static inline struct kogi_item kogi_list_back(struct kogi_list const* list)
{
    assert(list->size);
    return list->tail.prev->item;
}

static inline struct kogi_item kogi_list_front(struct kogi_list const* list)
{
    assert(list->size);
    return list->head.next->item;
}

